<?php
require_once ("./class/H.class.php");
require_once ("./class/File.class.php");


$fileObj = new File();
$files = $fileObj->directoryToArray('/Volumes/NO NAME/sztv/影视',true);

foreach($files as $k => $v){
    $dir = dirname($v['txt']);
    $newFileName = pathinfo($v['txt'])['filename'];
    @copy($v['mp4'],$dir.'/'.$newFileName.'.mp4');
    echo 'copy success.'.$k.chr(10);

//    if(pathinfo($v)['extension'] == "txt"){
//       //rename();
//        $dir = dirname($v);
//        copy()
//    }
//    $newFileName = pathinfo($file)['filename'];

}
//H::p($files);

